import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'
import app from './modules/app'
import settings from './modules/settings'
import user from './modules/user'
import addRoutes from './modules/addRoutes' // 必须导入关联起来
Vue.use(Vuex)

const store = new Vuex.Store({
  // 组合模块的配置项
  modules: {
    app,
    settings,
    user,
    addRoutes
  },
  // state的计算属性
  // 创建对于模块中的快捷访问
  getters
})

export default store
